home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
15
/
8
/
DISK1584.ZIP
/
FCDOC.DOC
< prev
next >
Wrap
Text File
|
1990-06-05
|
24KB
|
537 lines
FCDOC Ver. 2.2
Mike Albert
Copyright (c) 1990
1 INTRODUCTION
FCDOC compares two text English files and lists the differences between
them sentence by sentence. FCDOC works with any ASCII text file
containing English text. FCDOC provides the following benefits:
o FCDOC ignores format differences, so changes in margins,
indentation, and white space are not shown. This allows you to
look at content changes without being distracted by unimportant
details.
o FCDOC can show word by word differences between sentences that
have changed.
o FCDOC lets you do multiple comparisons in one run.
o FCDOC never gets confused or "unsynchronized" (as some
comparison programs can).
o FCDOC always finds the smallest set of differences between
files, and never misses matching sentences.
o FCDOC lets you list changes in ways that make sense to you by
providing multiple display options. You can also customize
FCDOC to use your favorite options automatically.
If you're familiar with earlier versions of FCDOC, look at section 7 to
learn about the enhancements.
FCDOC can be used on any IBM-compatible computer. Any display adapter
that provides 25 lines of 80 characters will work correctly. FCDOC runs
under MS-DOS versions 2.0 and later, but 3.0 or later is required to
customize the default options. The amount of memory required is
dependent on file size. 100K is enough for small files, while up to
425K is needed for large ones. Files containing up to 16,300 sentences
can be compared.
2 OPERATION
To list the differences between two ASCII English text files sentence by
sentence:
fcdoc file1 file2 options
Changes to file1 to make file2 are listed. Wild-card characters can be
used to do multiple comparisons. The options are:
-a list all sentences (whether different or the same)
-s list only sentences that are the same
-o list one sentence per line
-e empty lines in the input file don't indicate sentence
ends
-c<n> show context for changes - list up to <n> unchanged
sentences as changed when that's clearer - default <n>
is 1
-d<n> show differences between changed sentences word by
word - <n> = 1 shows minor differences, 10 shows all -
default <n> is 5
-u update default options, -u- clears old defaults first
>file3 put difference listing in file file3
A default option can be turned off with a minus sign, e.g. -m- turns off
the -m option. You can also make an option affect only screen output or
file output - an "s" after the option letter indicates screen output,
while "f" indicates file output. E.g. -ds5 specifies that the -d5
option is used for screen output, but doesn't affect output to a file.
This feature is useful when updating default options (with the -u
option), because you often want different options for the two output
devices.
The following examples illustrate the use of FCDOC:
Compare two files in the current directory and display the
differences on the screen:
fcdoc wp1.asc wp2.asc
Compare two files in different directories and drives, list all
sentences on separate lines, and put the difference listing in file
wp2.dif:
fcdoc d:\backup\wp1.asc c:\wp\wp2.asc -a -o >wp2.dif
Compare two files with the same names in different directories and
drives:
fcdoc d:\backup\wp1.asc c:\wp
Compare all files with ".c" extensions and the same names in two
different directories:
fcdoc \backup\*.c \wp\*.*
Change the default options for future invocations of FCDOC to -c for
output to either output device, and -d5 for output to the screen:
fcdoc -u- -c -ds5
Turn off the -o default option (which was previously set) for output
to a file, but leave it on for screen output:
fcdoc -u -of-
3 DETAILED OPERATION
The arguments to FCDOC (files and options) can be supplied in any order.
The options work as follows:
-a All - FCDOC normally lists only the sentences that differ
between the two files. With the -a option, matching
sentences are also listed.
-s Same - With the -s option, only matching sentences are
listed.
-o FCDOC normally lists the sentences as normal English text.
With the -o option, sentences are listed one per line.
-e FCDOC normally interprets an empty line in the input file as
a sentence end. The -e option indicates that sentences
continue across empty lines. This option is useful with
double-spaced documents.
-c<n> Context - When this option is used, FCDOC shows context
surrounding changes to make the listing more readable. This
is done by listing unchanged sentences as changed when they
are between changed sentences. Use this option when you
want to make the listing easier to understand, and don't
care if a few unchanged sentences are listed as changed.
The value <n> indicates how many unchanged sentences can be
listed as changed. An <n> of 1 or 2 is usually sufficient.
The default value of <n> is 1.
-d<n> Differences - Show differences between changed sentences
word by word. If the listing is shown on the screen,
differences are identified by reverse video. If the listing
is directed to an output file, changes are enclosed in curly
brackets (i.e. "{}"). The value of <n> indicates which
differences are shown - this is useful because showing the
differences between totally different sentences is
confusing. An <n> of 1 shows only minor differences, while
10 shows all. The default value of <n> is 5.
-u Update - This feature updates the default options. You can
use this option to make your favorite options the default,
so you don't have to enter them every time you use FCDOC.
When you use the -u option, the current options (i.e. the
current defaults plus options specified on the command line)
become the default. The -u- option is like -u, except that
the current defaults are ignored - only the options shown on
the command line become the new defaults. FCDOC can't
update the options and compare files in the same run, so
don't specify file names when you use the -u or -u- option.
This feature works by changing the program (i.e. fcdoc.exe)
file. If you want, you can make multiple FCDOC's with
different default options by simply copying the fcdoc.exe
file with a new name (e.g. fcdocnew.exe) and using the -u
option to set the default values of the copy. This feature
only works with MS-DOS version 3.0 or later.
>file FCDOC normally displays the difference listing on the
or screen. This option directs the listing to the file you
>>file specify -just enter the file name after the ">". If the
file already exists, it is overwritten. The ">>" option can
be used in the same way to append the listing to the end of
a file, instead of overwriting it.
The file names specify a drive and directory in the normal MS-DOS
manner. If no drive is specified, FCDOC looks for files on the current
drive. If no directory is specified, FCDOC looks in the current
directory. The standard MS-DOS wild-card characters may be used to
compare multiple files. When FCDOC finds wild-card characters in the
first file name, it performs a compare for each matching file. A wild-
card character in the second name means use the name (or extension) of
the first file. If the second file is not found FCDOC indicates it is
missing, and continues with other files that match the first name. If
you specify a directory or drive (without a file name and extension) for
either the first or second name, FCDOC acts as though you specified a
file and extension of "*.*". The following examples illustrate these
principles:
Compare all files with ".wp" extensions and the same names in two
different directories:
fcdoc \backup\*.wp \wp
Compare files fcupdate.wp1 and fcupdate.wp2:
fcdoc fcupdate.wp1 *.wp2
Compare all files in the current directory with ".wp1" extensions
with files that have the same names and ".wp2" extensions in the
same directory:
fcdoc *.wp1 *.wp2
Compare all files in current directory with files that have the same
names on the diskette in drive b:
fcdoc . b:
Compare all files with names starting with "a" and having a ".wp"
extension with files that have the same names in the directory
"work" that is a subdirectory of the parent directory of the current
directory:
fcdoc \backup\a*.wp ..\work
The files must contain ASCII English text. Displayable characters with
values above 7F hex (e.g. line drawing characters) will also be
processed correctly. FCDOC will process non-English languages
incorrectly, because it cannot recognize the sentence ends reliably.
FCDOC discards non-printable characters and extra blanks before
comparing sentences. If two sentences differ only in this regard, FCDOC
will report that they are the same.
If you want to compare WP documents, you must use the export, convert,
or print-to-file feature of your word processor to make ASCII files.
Your WP documentation should describe the process.
FCDOC only processes sentences of up to 2,000 characters. If FCDOC
encounters a longer sentence, it breaks it after the 2,000th character
to make two separate sentences.
If you display the difference listing on the screen, you can control the
scrolling. When FCDOC is scrolling, pressing any key makes it pause.
When it pauses, you can use the following keys:
Enter Show another screen full (24 lines)
space Show one more line
s Scroll continuously
ESC Exit the program
You can also use the Ctrl-S and Ctrl-Q keys (the ASCII terminal
convention) to regulate scrolling if you prefer.
4 FCDOC MESSAGES
Error: argument -<x> is invalid
FCDOC couldn't recognize the argument you specified on the
command line (argument <x>). Check the list of arguments that
FCDOC accepts to determine what options you can use. You can
list the options FCDOC recognizes by typing "fcdoc ?".
Error: the -<x> option value <v> is wrong
FCDOC couldn't recognize the value <v> specified with the <x>
option on the command line. Most options accept one or two
decimal digits, e.g. -d10 to specify showing all word
differences. Check the list of options that FCDOC accepts to
determine what values you can use. You can list the options and
values FCDOC recognizes by typing "fcdoc ?".
Error: more than two file names specified
Error: fewer than two file names specified
FCDOC didn't find the names of two files to compare on the
command line. If you forgot to specify the minus sign ("-") in
front of an option, FCDOC interpreted it as a file name. You
must specify two file names.
Error: both -<x> and -<y> options specified together
FCDOC found two incompatible options (<x> and <y>) specified on
the command line. You can only use one at a time.
Error: <n> is too small a value for option -<x> - the lower limit
is <m>
FCDOC found a value (<n>) specified for option <x> that is too
small. You must specify a value greater than or equal to <m>.
Error: <n> is too large a value for option -<x> - the limit is <m>
FCDOC found a value (<n>) specified for option <x> that is too
large. You must specify a value less than or equal to <m>.
Error: file <f> wasn't found
FCDOC couldn't find file <f>. If you didn't specify a directory
or drive, FCDOC looked in the current directory and drive. Make
sure you specify the correct file name, with the directory and
drive if needed, on the command line.
Error: no files found at <f>
FCDOC couldn't find any files in directory or drive <f>. Make
sure you specify the correct drive and directory on the command
line.
Error: no files match <f>
FCDOC couldn't find any files that matched file name <f>, which
contains wild-card characters. Make sure you specify the
correct file name on the command line.
Error: more than 16,300 sentences in file <f>
File <f> contains more than 16,300 sentences. FCDOC can only
process files containing up to 16,300 sentences. Your only
option is to break your files into smaller files.
Error: not enough memory to process these files
FCDOC needs more memory to process these files than is
available. FCDOC will continue by comparing the remaining files
if you specified multiple comparisons, otherwise it will
terminate. The only way to correct this problem is to run on a
machine with more memory, remove any memory-resident programs,
or to split the file into smaller files. This problem only
occurs when comparing large files on machines with small memory
configurations.
Warning: Not enough memory to show sentence differences
FCDOC needs more memory to list the word-by-word differences
between a set of changed sentences (as requested with the -d
option) than is available. FCDOC will not list word-by-word
differences for this set of sentences, but will with others.
This problem only occurs when comparing large files on machines
with small memory configurations.
Error: output failed, disk probably full
FCDOC detected an error when writing a file. This only occurs
when the difference listing is directed to a file with the ">"
or ">>" options. The most likely cause of this error is a full
disk.
Error: file names can't be used with the "-u" option
FCDOC found file names specified on the command line with the -u
or -u- option. You can't update default options and compare
files at the same time.
Error: couldn't update default options
FCDOC couldn't write to the program (i.e. fcdoc.exe) file to
update the default options. This happens when the fcdoc.exe
file is on a write-protected floppy disk, the file has been
given the read-only attribute, you're using an MS-DOS version
less than 3.0, or the file is on a network server and you don't
have write privileges for the file.
5 LICENSING, WARRANTY, and REGISTRATION
FCDOC is distributed as user-supported software. I encourage you to try
the program and share it with friends as long as:
The FCDOC program and this documentation file are not modified and
are distributed together.
FCDOC is not provided as a part of any other product.
No fees, beyond a reasonable fee for media, duplication, or
downloading costs, are charged.
FCDOC is not used for commercial, government, or business purposes
without registration. Each registration is for a single person or a
single computer.
If you find FCDOC useful and decide to use it regularly, you are
required to register. All registration payments will be donated to
Oxfam America, an international development and disaster relief agency.
It's a worthy charity that I've been supporting for many years. For
more information on Oxfam see section 6.
When you register you get the satisfaction of saving lives in Africa,
Asia, and South America, and encourage me to produce more software at
reasonable prices. You also get the following benefits:
I'll notify you of new FCDOC versions when they become available.
I'll send an updated version of FCDOC to you at no additional cost.
You can request this at any time. I'll do this once per registered
user.
I'll answer any questions you have on FCDOC and its use. You can
contact me at the address shown below - I'll respond in writing or
by phone.
If any important bugs are found I will notify you.
I'll make an attempt (but can't guarantee) to fix any problems you
find.
Registration is $25. Please make your check payable to Oxfam America -
I'll send your checks to Oxfam and record your registration information.
I'll also accept original canceled checks or receipts from Oxfam that
list you as the donor. Please send payments, registration information,
and any other correspondence to:
Mike Albert
Suite 42
P. O. Box 2100
Chelmsford, MA 01824
Anyone can order the latest version of FCDOC directly from me for a fee
of $5.00. Just send the order (make sure it contains your mailing
address) with your check to the above address. You'll receive a 5 1/4
inch 360Kb floppy disk containing the executable and documentation
files. If you need other formats (5 1/4 inch 1.2Mb or 3 1/2 inch
1.44Mb) I can provide them. I'll also include other shareware products
I produce. If you live outside North America, please send extra money
for the increased postage.
I welcome all comments and suggestions concerning FCDOC. I'd like to
know how you are using FCDOC, where you obtained it, and what problems,
bugs, or weaknesses you find. If you tell me about enhancements or
changes you're interested in, I'll make an effort to provide them.
This program is provided "as is" without warranty of any kind, either
express or implied, but not limited to the implied warranties of
merchantability or fitness for a particular purpose. The entire risk as
to the results and performance of the program is assumed by the user.
Should the program prove defective, the user assumes the entire cost of
all necessary servicing, repair, or correction.
6 OXFAM AMERICA
As stated in Oxfam literature,
"Oxfam America is an international agency that funds self-help
development projects and disaster relief in poor countries in
Africa, Asia, and Latin America, and also prepares and distributes
educational materials for people in the United States on the issues
of development and hunger. The name "Oxfam" comes from the Oxford
Committee for Famine Relief, founded in England in 1942. Oxfam
America, based in Boston, was formed in 1970, and is one of seven
autonomous Oxfams around the world (Great Britain, Australia,
Belgium, Canada, Quebec, Hong Kong and the United States). Oxfam is
a nonsectarian, nonprofit agency that neither seeks or accepts U.S.
government funds. All contributions are tax-deductible to the
extent permitted by law."
For more information, you can phone Oxfam at 617-482-1211, or write to
them at:
Oxfam America
115 Broadway
Boston, MA 02116
7 FCDOC REVISION HISTORY
FCDOC version 2.2 - 6/5/90
Added -c option to show changes in context.
Added -u option to let the user set default options.
Added -d option to show word-by-word differences between changed
lines.
Added comparison of multiple files in a single run - this is
invoked by specifying wild-card characters in file names.
Increased the speed - some comparisons take only half the time
of the previous version.
Added separate sets of options that are selected based on the
output device, i.e. the screen or a redirected output file.
Added support of Ctrl-S and Ctrl-Q to suspend and resume display
scrolling.
Fixed a minor problem that occurred when another program invoked
FCDOC and input redirection was used.
Fixed error in handling Ctrl-C when display scrolling is paused.
FCDOC version 1.3 - 7/10/89
Corrected problem in which matching sentences occasionally were
listed as different.
Added -s option to list only sentences that match.
FCDOC version 1.2 - 3/20/89
Increased speed.
Increased number of sentences that can be compared - from 8,000
to 16,300.
Increased maximum sentence length from 1000 to 2000 characters.
Added display of characters with values above 7F. This is
particularly useful for non-English text.
Fixed bug that occurred intermittently with long sentences (i.e.
around 1,000 characters) - FCDOC would never complete.
Fixed bug that occurred when processing a very large (around
8,000 sentence) file - FCDOC would incorrectly report that there
was insufficient memory to process the file.
FCDOC version 1.1 - 2/16/89
Added documentation (that you're reading now).
Improved readability of difference listing for multi-paragraph
deletions or additions.
Improved recognition of sentence ends.
Added interactive control of screen display.
Changed informational and usage messages displayed by program.
Added display of international (above 7F hex) ASCII characters.
Added accept of Ctrl-C during file read.
FCDOC version 1.0 - 1/9/89
Initial release of FCDOC program.